package com.mustaphakoumach.tusbd;

import java.util.Calendar;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class TusbdActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		goToMain();
	}

	private void goToMain() {
		// get the current date
		final Calendar c = Calendar.getInstance();
		String date = String.valueOf(c.get(Calendar.DAY_OF_MONTH)) + "/"
				+ String.valueOf(c.get(Calendar.MONTH)+1) + "/"
				+ String.valueOf(c.get(Calendar.YEAR));
		// Creamos el bundle
		Bundle bundle = new Bundle();
		// Le ponemos la variable parametro con el contenido test
		bundle.putString("date", date);
		bundle.putString("stopStart", "");
		bundle.putString("stopDistination", "");
		bundle.putString("hourlyRate", "");
		Intent i = new Intent(this, Main.class);
		// Con el putExtras le pasamos el bundle
		i.putExtras(bundle);
		startActivity(i);
	}
}